Hardware Automatic Performance State Transitions in System on Processor Sleep and Wake Events

ABSTRACT

In an embodiment, a power management unit (PMU) may automatically transition (in hardware) the performance states of one or more performance domains in a system. The target performance states to which the performance domains are to transition may be programmable in the PMU by software, and software may signal the PMU that a processor in the system is to enter the sleep state. The PMU may control the transition of the performance domains to the target performance states, and may cause the processor to enter the sleep state. In an embodiment, the PMU may be programmable with a second set of target performance states to which the performance domains are to transition when the processor exits the sleep state. The PMU may control the transition of the performance domains to the second targeted performance states and cause the processor to exit the sleep state.

This application is a divisional of U.S. patent application Ser. No.13/863,554, filed Apr. 16, 2013, which is continuation of U.S. patentapplication Ser. No. 13/590,217, filed Aug. 21, 2012 and now U.S. Pat.No. 8,443,216, which is a continuation of U.S. patent application Ser.No. 12/756,006, filed Apr. 7, 2010 and now U.S. Pat. No. 8,271,812. Theabove applications are incorporated herein by reference in theirentirety.

BACKGROUND

1. Field of the Invention

This invention is related to the field of systems including processorsand peripheral devices, and managing power consumption in such systems.

2. Description of the Related Art

As the number of transistors included on an integrated circuit “chip”continues to increase, power management in the integrated circuitscontinues to increase in importance. Power management can be critical tointegrated circuits that are included in mobile devices such as personaldigital assistants (PDAs), cell phones, smart phones, laptop computers,net top computers, etc. These mobile devices often rely on batterypower, and reducing power consumption in the integrated circuits canincrease the life of the battery. Additionally, reducing powerconsumption can reduce the heat generated by the integrated circuit,which can reduce cooling requirements in the device that includes theintegrated circuit (whether or not it is relying on battery power).

Clock gating is often used to reduce dynamic power consumption in anintegrated circuit, disabling the clock to idle circuitry and thuspreventing switching in the idle circuitry. Additionally, someintegrated circuits have implemented power gating to reduce static powerconsumption (e.g. consumption due to leakage currents). With powergating, the power to ground path of the idle circuitry is interrupted,reducing the leakage current to near zero.

Clock gating and power gating can be effective power conservationmechanisms. However, in some cases, these mechanisms are not aseffective as desired. For example, systems that include processors cancause the processors to enter a sleep state to conserve power. While theprocessor is in the sleep state, other components in the system arestill active, and often are operating at performance levels that supportthe active processors. When the processors are in the sleep state, theseother components need not be operating at such a high performance level.Similarly, when the processors are awakened from the sleep state, theperformance level at which the processors and other components need tooperate to support the activities being performed by the system may bedifferent than the performance level prior to the processor entering thesleep state.

The sleep/wake transitions of the processors and other components arechanged under software control. The software executes on the processors,and thus changing the performance levels of the processors and othercomponents can affect the amount of time required to execute thesoftware. These effects impact the efficiency of the transition,impacting the power conserved and the performance of the application.Furthermore, the software execution time can affect how often theprocessor is transitioned to the sleep state, and the amount of reducedperformance that can be tolerated in the rest of the system.

SUMMARY

In an embodiment, a power management unit may be configured toautomatically transition (in hardware) the performance states of one ormore performance domains in a system. The target performance states towhich the performance domains are to transition may be programmable inthe power management unit by software. Additionally, the software maysignal the power management unit that a processor in the system is toenter the sleep state. Alternatively, the power management unit maymonitor the processor to detect that the processor is entering the sleepstate or has entered the sleep state. The power management unit may beconfigured to control the transition of the performance domains to thetarget performance states, and may also cause the processor to enter thesleep state in some embodiments. In an embodiment, the power managementunit may be programmable with a second set of target performance statesto which the performance domains are to transition when the processorexits the sleep state. The power management unit may be configured tocontrol the transition of the performance domains to the second targetedperformance states and may also cause the processor to exit the sleepstate in some embodiments.

In one embodiment, the transition of the performance domains intodifferent target states may be more rapid when controlled by the powermanagement unit than may be possible with software control. Accordingly,the power conservation may be more efficient than a purelysoftware-controlled implementation, and the performance of applicationsexecuting in the system may also be positively affected. Additionally,the configureability of the performance states may permit morefine-grained control of the performance level in the system and thus maypermit additional power savings. In some cases, the performance statesmay be reduced further than would be possible in the software-controlledimplementation, because the time required for the software to executewhile the system is in the lower performance states is a reduced factor(or may even be eliminated).

Each component of the system may be included in a performance domain,and each performance domain may include at least one component but mayinclude multiple components, in various embodiments. The powermanagement unit may be programmable with performance state identifiersfor each performance domain, and for each hardware-managed transition(e.g. into the sleep state, out of the sleep state, or both into and outof the sleep state, in various embodiments). The sleep state of theprocessor may also be a performance state, as may various otherperformance states that the processor may be programmed to in variousembodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

The following detailed description makes reference to the accompanyingdrawings, which are now briefly described.

FIG. 1 is a block diagram of one embodiment of a system.

FIG. 2 is a block diagram of one embodiment of performance configurationregisters illustrated in FIG. 1.

FIG. 3 is a flowchart illustrating operation of one embodiment of apower management unit to automatically change power states.

FIG. 4 is a block diagram illustrating one embodiment of drivercomponents.

FIG. 5 is a flowchart illustrating operation of one embodiment of apower management unit driver component.

FIG. 6 is a block diagram illustrating another embodiment of a system.

FIG. 7 is a block diagram of one embodiment of a computer accessiblestorage medium.

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and will herein be described in detail. Itshould be understood, however, that the drawings and detaileddescription thereto are not intended to limit the invention to theparticular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention as defined by the appendedclaims. The headings used herein are for organizational purposes onlyand are not meant to be used to limit the scope of the description. Asused throughout this application, the word “may” is used in a permissivesense (i.e., meaning having the potential to), rather than the mandatorysense (i.e., meaning must). Similarly, the words “include”, “including”,and “includes” mean including, but not limited to.

Various units, circuits, or other components may be described as“configured to” perform a task or tasks. In such contexts, “configuredto” is a broad recitation of structure generally meaning “havingcircuitry that” performs the task or tasks during operation. As such,the unit/circuit/component can be configured to perform the task evenwhen the unit/circuit/component is not currently on. In general, thecircuitry that forms the structure corresponding to “configured to” mayinclude hardware circuits. Similarly, various units/circuits/componentsmay be described as performing a task or tasks, for convenience in thedescription. Such descriptions should be interpreted as including thephrase “configured to.” Reciting a unit/circuit/component that isconfigured to perform one or more tasks is expressly intended not toinvoke 35 U.S.C. §112, paragraph six interpretation for thatunit/circuit/component.

DETAILED DESCRIPTION OF EMBODIMENTS

Turning now to FIG. 1, a block diagram of one embodiment of a system isshown. In the embodiment of FIG. 1, the system includes an integratedcircuit (IC) 10 forming a system on a chip, and a power supply 12. Theintegrated circuit 10 includes a set of performance domains 14A-14F.Each performance domain 14A-14F includes at least one component of theintegrated circuit 10, and a given performance domain may include morethan one component. For example, the performance domain 14A in FIG. 1includes two components, a processor 16A and another component 18; andthe performance domain 14E may include two or more peripherals 24. Inthe illustrated embodiment, the performance domain 14B includes anoptional second processor 16B; the performance domain 14C includes agraphics unit 20; the performance domain 14D includes an audio unit 22;the performance domain 14E includes networking peripherals and/or otherperipherals and/or peripheral interface units 24; and the performancedomain 14F includes a memory controller 26. The integrated circuit 10also includes a power management unit (PMU) 28 (which includes one ormore performance configuration registers 30) and a clock/voltage controlunit 32. The various components shown in FIG. 1 may be coupled in anydesired fashion. For example, there may one or more buses or otherinterfaces between the components. The PMU 28 and the clock/voltagecontrol unit 32 may also be coupled to the various components inaddition to being coupled to the interfaces. For example, theclock/voltage control unit 32 may supply clock signals to the components(not shown in FIG. 1). The clock/voltage control unit 32 may beconfigured to communicate with the power supply 12 to request one ormore supply voltages from the power supply 12. The power supply 12 maygenerate the requested voltage or voltages, and may supply theintegrated circuit with the voltages.

The PMU 28 may be configured to control transitions between performancestates for the various performance domains 14A-14F. Particularly, thePMU 28 may be configured to automatically transition one or more of theperformance domains 14A-14F in response to one or more processors16A-16B entering a sleep state (or in response to determining that theprocessor is to enter the sleep state). The PMU 28 may also beconfigured to automatically transition one or more of the performancedomains 14A-14F in response to the processor exiting the sleep state (orin response to determining that the processor is to exit the sleepstate). Exiting the sleep state may also be referred to as “waking” theprocessor. The sleep state and other states of the processors may beperformance states of the performance domains that include theprocessors. Alternatively, the sleep state and other processor statesmay be performance characteristics in a performance state for theperformance domains including the processors.

A performance domain may be one or more components that may becontrolled by the PMU 28 as a unit for performance configurationpurposes. That is, the PMU 28 may be configured to establish acorresponding performance state for each performance domain, and may beconfigured to control transitions between performance states in eachperformance domain. The components that form a performance domain maytransition together from one performance state to another performancestate. On the other hand, components in different performance domainsmay be independent of each other, at least from the standpoint ofhardware, and may have independently-determined performance states. Someperformance domains may be logically linked at a higher level (e.g. insoftware). For example, the performance domains 14C-14D may be logicallylinked if a user is watching a video that includes sound (thus using thegraphics unit 20 to display the video images and the audio unit 22 totransmit the sound).

The performance state may include any combination of performancecharacteristics for the components in a corresponding performancedomain. A performance characteristic may be any configurable setting fora component that affects the performance of that component. For example,the operating frequency of the clock signal provided to a component mayaffect its performance. A lower operating frequency may result in lowerperformance. A corresponding supply voltage may also be a performancecharacteristic. Some performance characteristics may becomponent-specific. For example, cache sizes in various caches may be aperformance characteristic. A data width or other data transfer rateparameter of an interface may be a performance characteristic. Acomponent that includes a number of symmetrical units that may operatein parallel (e.g. execution units in a processor, pixel pipelines orother image processing pipelines in a graphics unit, etc.) may beconfigurable as to the number of symmetrical units that are active. Anumber of instructions (processor), operations (graphics or audio),communications (network or other peripheral interface), or memoryrequest (memory control unit) processed per unit of time may be aperformance characteristic. A graphics resolution or size of the colorpalette (e.g. bits per pixel) may be a performance characteristic. Audioresolution and sample rates may be a performance characteristic. Memorybandwidth may be a performance characteristic. The sleep/wake state ofthe processor may be a performance characteristic. If components orportions thereof can be power-gated and/or clock-gated, the power and/orclock enables may be performance characteristics. Any parameter that maybe changed and that may affect performance may be a performancecharacteristic in various embodiments.

Changing the performance state in a performance domain may affect thepower consumption of the performance domain. Reducing operatingfrequency and supply voltage have direct effects on power consumption.Reducing cache size may reduce power consumption because a portion ofthe cache may not be accessed, and even more reduction may be realizedif the unused portion may be turned off. Furthermore, reduced cache sizemay reduce cache hit rates, which may increase memory latency to theconsumer. Increased memory latency may reduce activity in the consumer,reducing power consumption. Reduced data transfer widths/rates oninterfaces may reduce power consumption through reduced switching.Additionally, reducing the rate at which data is supplied to a consumermay reduce activity in the consumer, which may reduce power consumptionin the consumer. Reduced parallel activity in symmetrical units mayreduce power consumption through reduced activity, as may reducedinstruction or other operation issue rates. Reducing graphics/audioresolution and color palette may reduce the amount of data transferredper image or unit of sound. Reduced memory bandwidth may reduce powerconsumption in accessing the memory per unit time, and may reduceactivity in the consumer.

In some embodiments, the performance state may include multipleinstances of a performance characteristic. For example, if the processoris powered off in the sleep state and other components are in the sameperformance domain, the voltage for the processor may be set separatelyfrom the voltage for the other components that remain active. Similarly,any other performance characteristics that apply to more than onecomponent in a performance domain and that may be independent controlledfor such components may be represented by multiple instances in theperformance state.

In embodiments in which a processor is in a performance domain withother components, the other components may remain active during timesthat the processor is in the sleep state. For example, the component 18in the performance domain 14A may remain active during times that theprocessor 16A is in the sleep state. The performance characteristics ofthe component may be changed to reflect reduced operation while theprocessor is in the sleep state. For example, the component 18 may be anlevel 2 (L2) cache coupled to the processor 16A. In such an embodiment,the L2 cache may not be accessed by the sleeping processor 16A but mayremain active to maintain cache coherence. The L2 cache may operate at alower clock frequency (and voltage) in some embodiments while stillproviding enough performance to ensure the cache coherence.

The PMU 28 may include circuitry configured to cause the performancestate transitions to occur in the performance domains. In oneembodiment, the PMU 28 may detect that the processor 16A-16B isentering/exiting the sleep state, and may cause correspondingtransitions in the performance domains. In other embodiments, softwaremay explicitly communicate sleep/wake events to the PMU 28. In anembodiment, the PMU 28 is programmable with performance configurationsfor each performance domain. For example, performance states to be usedin the performance domains 14A-14F when the processor is in sleep statemay be specified in the performance configuration registers 30.Performance states to be used when the processor 16A-16B exits the sleepstate (awakens) may also be specified. When either event occurs, the PMU28 may cause the desired transitions.

In the case of voltage and clock frequency changes, the PMU 28 maycommunicate the new settings to the clock/voltage control unit 32. Theclock/voltage control unit 32 may implement the new settings, generatingthe clocks at the requested frequencies and requesting the desiredsupply voltages from the power supply 12. The clock/voltage control unit32 may order the modifications, if necessary, to safely make thetransitions. For example, if the clock frequency and supply voltage arebeing increased, it may be safer to increase the voltage first, and thenincrease the clock frequency because the increased clock frequency maylead to incorrect operation if circuitry is operating more slowly at thecurrent (lower) supply voltage. In some embodiments, the amount of timethat elapses in a supply voltage change may be substantially greaterthan the time to change the clock frequency. If the clock frequency andsupply voltage are being decreased, the clock frequency may be reducedfirst (or the frequency and voltage may be reduced in parallel, sincethe lower clock frequency may be reached prior to the lower supplyvoltage in this case).

The clock/voltage control unit 32 may include circuitry to communicatewith the power supply 12 to request the desired supply voltages, and mayinclude clock generation circuitry. For example, the clock/voltagecontrol unit 32 may include one or more phase lock loops (PLLs), clockdividers/multipliers, etc. to generate clocks for the components.

The various components included in the integrated circuit 10 mayimplement any desired functionality. Generally, a component may refer toany circuitry that is defined to perform a specified set of operationsin the integrated circuit, and has a defined interface to communicatewith other components in the integrated circuit. As illustrated in FIG.1, exemplary components may include the processors 16A-16B, thecomponent 18, the graphics unit 20, the audio unit 22, the networkingperipheral and other peripheral/peripheral interfaces 24 (which may bemultiple components), and the memory controller 26.

The processors 16A-16B may implement any instruction set architecture,and may be configured to execute instructions defined in thatinstruction set architecture. Any microarchitectural implementation maybe used (e.g. in order, out of order, speculative, non-speculative,scalar, superscalar, pipelined, superpipelined, etc.). Microcodingtechniques may be used in some embodiments, in combination with any ofthe above.

As mentioned above, the performance state of the processors 16A-16B mayinclude a sleep state. In the sleep state, the processor is idle (notexecuting instructions). The clock to the processor may be stopped. Insome embodiments, power may also be removed from the processor in thesleep state. Alternatively, there may be more than one sleep state. Oneof the sleep states may include powering down the processor, and anothersleep state may include retaining power to the processor. Additionally,the processor may include at least one “awake state”. There may bemultiple awake states. For example, different supply voltage/operatingfrequency combinations may be supported, different combinations ofenabled execution units may be supported, different instruction issuerates may be supported, etc.

The graphics unit 20 may include any circuitry involved in the displayof images on a display device for, e.g., user viewing. The images may bestatic images, or may be part of a video. The graphics unit 20 mayinclude rendering hardware, refresh (of the display device) hardware,video encoders and/or decoders, video compression and decompressionunits, etc. The audio unit 22 may include any circuitry involved in theplaying or recording of sounds in the system. The audio unit 22 mayinclude, e.g., audio encoders and/or decoders, digital signalprocessors, etc.

The networking peripherals and other peripherals 24 may include avariety of circuitry. For example, the networking peripherals mayinclude a media access controller (MAC) unit for the supported network,as well as physical layer circuitry. The other peripherals may includeany other desired peripherals, and/or peripheral interface controllersconfigured to control off-chip peripheral interfaces such as PeripheralComponent Interconnect (PCI), PCI express (PCIe), firewire, UniversalSerial Bus (USB), etc.

The memory controller 26 may be configured to access memory devices suchas dynamic random access memory devices (DRAM), synchronous DRAM(SDRAM), double data rate (DDR, DDR2, DDR3, DDR4, etc.) SDRAM, low powerDDR (LPDDR2, etc.) SDRAM, RAMBUS DRAM (RDRAM), etc. In one embodiment,the memory controller 26 may be configured to interface to one or morememory modules (e.g. single inline memory modules (SIMMs), dual inlinememory modules (DIMMs), etc.) that include one or more of the abovememories. Accordingly, the memory controller 26 may be configured tocommunicate on the memory interfaces, to queue memory requests fromother components in the integrated circuit 10, and to communicate withthe other components to complete the memory operations.

While the embodiment of the integrated circuit 10 shown in FIG. 1includes numerous performance domains, more or fewer performance domainsmay be supported. For example, a single performance domain may besupported, or two performance domains may be supported (e.g. one domainincluding the processors 16A-16B and another domain including theremaining components 18, 20, 22, 24, and 26). One or more processors16A-16B may be included in a performance domain with any subset of thecomponents 18, 20, 22, 24, and 26. Any combination of performancedomains and components included in those domains may be implemented invarious embodiments.

Other embodiments of the integrated circuit 10 may include othercombinations of components, including any subset of the illustratedcomponents with or without other components, supersets with othercomponents, etc. Additionally, while the illustrated embodimentillustrates the components 16A-16B, 18, 20, 22, 24, and 26 all includedin the integrated circuit 10, other embodiments may implement thecomponents as two or more integrated circuits. Any level of integrationor discrete components may be used.

Turning now to FIG. 2, a block diagram illustrating one embodiment ofthe performance configuration registers 30 is shown. In the illustratedembodiment, the registers 30 include register set 30A, register set 30B,and register set 30C. The register set 30B may include a configurationfor each performance domain, and for the sleep state and the wake state.Accordingly, the illustrated set supports up to “n” performance domains,where “n” is a positive integer. The sleep state for a given performancedomain indicates the performance state for the domain in response to theprocessor entering the sleep state. The wake state for the givenperformance domain indicates the performance state for the domain inresponse to the processor exiting the sleep state.

In some embodiments, the registers 30B may directly store valuesdefining the performance state to be established in the correspondingpower domain. In such cases, the software preparing the integratedcircuit 10 for a sleep state of the processors 16A-16B may program eachregister 30B for the sleep state and the following wake state accordingto the activity in the system.

In the illustrated embodiment, the registers 30B may store pointers toregister sets 30A or 30C, where the set of registers to which thepointer is referenced is dependent on the performance domaincorresponding to that register. In some embodiments, there may beregister sets similar to 30A or 30C for each performance domain.Alternatively, similar performance domains may share register sets. Forexample, if the processor performance domains 14A and 14B are the samein terms of the performance characteristics that may be changed, theperformance domains 14A-14B may share the same registers sets 30A or30C. Each register set 30A and 30B may store performance stateconfigurations for the corresponding performance domain. Accordingly,software may program a set of performance states in the register sets30A or 30C, and then select an appropriate performance state for boththe sleep transition of the processor and the wake transition of theprocessor prior to transitioning the processor into the sleep state. Theselection may be made by writing the pointer in each registercorresponding to the performance domain in the registers 30B.Accordingly, the performance states may be dynamically modified based onactivity in the system before each sleep state transition.

Providing performance state configurations for the wake state of theprocessor may permit various performance domains to automaticallytransition to a performance state that is different from the performancestate of the performance domain prior to the processor entering thesleep state. Thus, for example, if software can predict the operationsthat may be performed when the processor awakens, a performance statethat is desirable for those operations may be established even in thecase that the wake performance state is different from the performancestate prior to the processor transitioning to the sleep state.

In some embodiments, the registers 30B may include a valid bit or otherindication used to indicate whether or not a transition is to occur inthe corresponding performance domain. Thus, a performance domain that ismost efficient at a given performance state at all times may be leftunmodified by clearing the valid bit. Or, a performance domain that isdisabled may be prevented from becoming enabled during a performancedomain transition.

The registers 30B may also include a register that may be written bysoftware to indicate that the sleep transition is commencing. The PMU 28may be configured to monitor for an update to the sleep commandregister, and may be configured to perform the sleep transition of theprocessor and the various other performance domain state transitions.Alternatively, software may use processor instruction executionmechanisms to cause the processor to enter the sleep state, and the PMU28 may be configured to perform other performance domain statetransitions.

The PMU 28 may also be configured to monitor for interrupts or otherevents that will cause a processor to wake up, in order to perform theperformance state transitions to exit the performance state. In someembodiments, the PMU 28 may also be configured to monitor processoroperation to automatically detect a processor entering sleep state (e.g.without the processor writing a command to a sleep command register).

In some cases, one or more performance domains may be more closelylinked with a particular processor in multiprocessor configurations. Insuch cases, the closely linked performance domains may transition todifferent performance states in response to the corresponding processorentering the sleep state, while other performance domains that are moreclosely linked to a still-active processor may not transition. Whetheror not performance domains transition may be hardware controlled by thePMU 28, or may be software controlled using the valid indications in theperformance configuration registers as described previously.Alternatively, the transitions may be performed when the last of theprocessors enters the sleep state (while the other processors arealready in sleep state) and the transitions for exit from the sleepstate may be performed when the initial processor exits the sleep state(e.g. in response to an external interrupt).

The set 30A may store various performance state configurations (up to“m” configurations, where “m” is a positive integer). Thus, for example,various registers in the set 30A may store voltages (V0, V1), operatingfrequencies (F0, F1), and/or other performance state information for theperformance domain 0 (PD0). The register set 30C may also store variousperformance state configurations (up to “p” configurations, where “p” isa positive integer) for the performance domain “n”. The integers n, m,and p need not be equal.

In some embodiments, the integrated circuit may support certain voltage,clock frequency pairs (e.g. there may be a minimum supply voltage tooperate at a given clock frequency). While the voltage and clockfrequency configurations in the registers 30B and 30C may not violatethe minimum supply voltage, in some cases it may be desirable to use adifferent supply voltage than the minimum. For example, if softwarepredicts that a first clock frequency is the correct frequency to returna performance domain to when the processor exits the sleep state, but ahigher clock frequency may be the correct setting if the prediction iswrong, the corresponding voltage in the registers 30B and 30C may be thevoltage used for the higher frequency. In this way, if the predictedfrequency is incorrect, the supply voltage may already be set to thedesired magnitude, reducing delay in making the adjustment to correctthe performance state when a misprediction occurs.

Turning next to FIG. 3, a flowchart is shown illustrating operation ofone embodiment of the PMU 28 and the clock/voltage control unit 32 tomanage performance state transitions in performance domains when aprocessor is entering or exiting a sleep state. While the blocks areshown in a particular order for ease of understanding, other orders maybe used. Blocks may be performed in parallel in combinatorial logic inthe PMU 28 and/or the clock/voltage control unit 32. Blocks,combinations of blocks, and/or the flowchart as a whole may be pipelinedover multiple clock cycles. Particularly, the decision blocks 40 and 48may be independent and may be performed in parallel or in either order.The PMU 28 and/or the clock/voltage control unit 32 may be configured toimplement the operation shown in FIG. 3.

The PMU 28 may detect that the processor is entering (or is about toenter) the sleep state, or that a last processor of a set of processorsis to enter the sleep state while the other processors are in the sleepstate in some embodiments (decision block 40, “yes” leg). In variousembodiments, the detection may occur by monitoring the processors16A-16B, via receiving a command in the sleep command register, etc. ThePMU 28 may load the sleep performance state for each performance domainfrom the performance configuration registers 30 (block 42). In someembodiments, an indication of whether or not the performance state isvalid in the registers 30 may qualify whether or not the performancestate is loaded. If the performance state includes supply voltage and/orclock frequency changes, the PMU 28 may supply the values specifying thevoltage/frequency to the clock/voltage control unit 32. If theperformance state includes other changes (e.g. cache size change,interface size change, etc.), the PMU 28 may transmit the changes to thecorresponding component. The PMU 28 and/or clock/voltage control unit 32may transition the performance domains to the new performance states(block 44). Supply voltage changes may be transmitted to the powersupply 12, and time to settle at the new voltage may be given. Clockfrequency changes may be programmed into the clock generation circuitryin the clock/voltage control unit 32 and time to settle to the newfrequency may be given if needed (e.g. time for a PLL to lock to the newfrequency). For other changes, the component may be signalled to switchto the new state. If time is needed to implement the change (e.g.flushing the portion of the cache that is disabled, resetting componentson an interface that has changed widths, etc.), such time may be given.In one embodiment, the PMU 28 may record a timestamp (e.g. in aperformance configuration register 30 dedicated to store a timestamp)indicating a time at which a performance state transition is completed.Software may capture the timestamp for statistical analysis to determinethe effectiveness of power savings measures implemented in the system,for example. The timestamp may be captured in any desired fashion. Forexample, the system may include a free-running counter that isincremented or decremented at a regular interval. The system may capturethe value of the counter as a timestamp.

The PMU 28 may detect that a processor is exiting the sleep state (or isabout to exit the sleep state) (decision block 48, “yes” leg). Invarious embodiments, the detection may occur by monitoring theprocessors 16A-16B (e.g. to detecting an interrupt being delivered toone of the processors). The PMU 28 may load the wake performance statefor each performance domain from the performance configuration registers30 (block 50). Similar to the discussion above regarding loading thesleep performance states, various communications may take place toimplement the new performance state configuration. The PMU 28 and/orclock/voltage control unit 32 may transition the performance domains tothe new performance states (block 52), and may record a timestamp whenthe transition is completed (block 54). The timestamp for waking may berecorded in a different register from the timestamp recorded forsleeping, to permit software to capture both timestamps since theprocessor is sleeping between the timestamp captures.

Turning next to FIG. 4, a block diagram illustrating a softwarestructure which may be implemented in one embodiment of a system isshown. The software may include one or more application programs (Apps),an operating system (OS), and various other software 60. The software 60may interact with various drivers when using components of the system.For example, a graphics driver 62 may be used for the graphics unit 20;an audio driver 64 may be used for the audio unit 22; a network driver66 may be used for the networking peripheral 24; other peripheraldrivers 68 may be used for other peripherals 24; and a PMU driver 70 maybe used for the PMU 28. Accordingly, if software 60 communicates withthe graphics unit 20, the software 60 calls the graphics driver 62, etc.Each of the drivers may communicate with the corresponding components.

Additionally, each of the drivers 62, 64, 66, and 68 may communicatewith the PMU driver 70. The PMU driver 70 may monitor the activity inthe components driven by the drivers 62, 64, 66, and 68 in a deviceactivity table 72. The monitored activities may include enabling anddisabling the corresponding components. The monitored activities mayfurther include changes to other performance characteristics of theunit. Based on the activities being monitored, the PMU driver 70 mayselect the performance state for each performance domain to be used inthe sleep and wake configurations of the performance configurationregisters 30. Additionally, other information may be coded into thedevice activity table (e.g. performance needs of various components whenthe processor is in the sleep state) which may affect the selectedperformance states as well.

The software 60 may also directly communicate with the PMU driver 70.For example, in addition to the automatic performance state transitionsperformed for sleep and wake transitions in the processors, the software60 may also change performance states directly based on the activity inthe system as a whole. That is, even if the processors are not going tothe sleep state, changes in the performance state of one or moreperformance domains may be desirable. The software 60 may directlyrequest such changes.

Turning next to FIG. 5, a flowchart illustrating operation of oneembodiment of the PMU driver 70 is shown. The PMU driver 70 may includeinstructions which, when executed on the system, implement the operationdescribed in the flowchart. While blocks are shown in a particular orderfor ease of understanding, other orders may be used.

If a component driver 62, 64, 66, or 68 receives a device enable ordisable request, the driver may transmit the request to the PMU driver70. The PMU driver 70 may receive the request and (decision block 80,“yes” leg) record the enable or disable event in the device activitytable 72 (block 82). In some embodiments, the PMU driver 70 may performthe enable or disable of the devices. In other embodiments, thecorresponding component driver may perform the enable/disable and maycall the PMU driver 70 to record the event.

In some embodiments, the PMU driver 70 may monitor other events in agiven component. The component driver may communicate these events tothe PMU driver 70 as well. Upon receipt of such events (decision block84, “yes” leg), the PMU driver 70 may record the event in the deviceactivity table (block 82).

The PMU driver 70 may determine if the events recorded in the deviceactivity table 72 indicate that a change in performance state for one ormore performance domains should be performed. Additionally, the software60 may directly request a change in one or more performance domains. Ineither case (decision block 86, “yes” leg), the PMU driver 70 mayprepare the corresponding hardware components for the performance statechange (e.g. communicating the new performance characteristics—block88), and may invoke the transition (block 90). Blocks 88 and 90 may thusrepresent a software-controlled performance state transition for one ormore performance domains.

The PMU driver 70 may further detect that a processor is preparing toenter the sleep state (decision block 92, “yes” leg). The PMU driver 70may determine the desired sleep and wake states for the performancedomains based at least on part of the device activity table 72 (block94). The PMU driver 70 may update the performance configurationregisters 30 to select the performance states, if needed (block 96), andmay transmit the sleep command to the PMU 28 to cause the performancestate transitions (e.g. writing the sleep command register in the PMU28) (block 98). Other embodiments may detect the processor entering thesleep state directly, and may cause the performance state transitionsbased on that detection. Such embodiments may eliminate block 98.

Accordingly, blocks 94 and 96 may represent programming the PMU 28 withperformance states for performance domains, for both sleep and wakestate transitions in the processor(s).

System and Computer Accessible Storage Medium

Turning next to FIG. 6, a block diagram of one embodiment of a system150 is shown. In the illustrated embodiment, the system 150 includes atleast one instance of an integrated circuit 10 (from FIG. 1) coupled toone or more peripherals 154 and an external memory 158. A power supply156 is also provided which supplies the supply voltages to theintegrated circuit 10 as well as one or more supply voltages to thememory 158 and/or the peripherals 154. The power supply 156 may includethe power supply 12 shown in FIG. 1, for example. In some embodiments,more than one instance of the integrated circuit 10 may be included (andmore than one external memory 158 may be included as well).

The peripherals 154 may include any desired circuitry, depending on thetype of system 150. For example, in one embodiment, the system 150 maybe a mobile device (e.g. personal digital assistant (PDA), smart phone,etc.) and the peripherals 154 may include devices for various types ofwireless communication, such as wifi, Bluetooth, cellular, globalpositioning system, etc. The peripherals 154 may also include additionalstorage, including RAM storage, solid state storage, or disk storage.The peripherals 154 may include user interface devices such as a displayscreen, including touch display screens or multitouch display screens,keyboard or other input devices, microphones, speakers, etc. In otherembodiments, the system 150 may be any type of computing system (e.g.desktop personal computer, laptop, workstation, net top etc.).

The external memory 158 may include any type of memory. For example, theexternal memory 158 may be SRAM, dynamic RAM (DRAM) such as synchronousDRAM (SDRAM), double data rate (DDR, DDR2, DDR3, etc.) SDRAM, RAMBUSDRAM, etc. The external memory 158 may include one or more memorymodules to which the memory devices are mounted, such as single inlinememory modules (SIMMs), dual inline memory modules (DIMMs), etc.

Turning now to FIG. 7, a block diagram of a computer accessible storagemedium 200 is shown. Generally speaking, a computer accessible storagemedium may include any storage media accessible by a computer during useto provide instructions and/or data to the computer. For example, acomputer accessible storage medium may include storage media such asmagnetic or optical media, e.g., disk (fixed or removable), tape,CD-ROM, DVD-ROM, CD-R, CD-RW, DVD-R, DVD-RW, or Blu-Ray. Storage mediamay further include volatile or non-volatile memory media such as RAM(e.g. synchronous dynamic RAM (SDRAM), Rambus DRAM (RDRAM), static RAM(SRAM), etc.), ROM, Flash memory, non-volatile memory (e.g. Flashmemory) accessible via a peripheral interface such as the UniversalSerial Bus (USB) interface, a flash memory interface (FMI), a serialperipheral interface (SPI), etc. Storage media may includemicroelectromechanical systems (MEMS), as well as storage mediaaccessible via a communication medium such as a network and/or awireless link. The computer accessible storage medium 200 in FIG. 7 maystore one or more of the software 60, the graphics driver 62, the audiodriver 64, the network driver 66, the other peripheral drivers 68, thePMU driver 70, and/or the device activity table 72. The PMU driver 70may include instructions which, when executed, implement the operationdescribed above with regard to FIG. 5. Generally, the computeraccessible storage medium 200 may store any set of instructions which,when executed, implement a portion or all of the operation shown in FIG.5. A carrier medium may include computer accessible storage media aswell as transmission media such as wired or wireless transmission.

Numerous variations and modifications will become apparent to thoseskilled in the art once the above disclosure is fully appreciated. It isintended that the following claims be interpreted to embrace all suchvariations and modifications.

What is claimed is:
 1. A computer accessible storage medium storing: aplurality of drivers, each of the plurality of drivers corresponding toa respective component of a plurality of components of a system, whereinthe plurality of drivers each comprise instructions which, when executedby a processor on the system, control the respective component; and apower management unit driver comprising instructions which, whenexecuted by the processor, control a power management unit in thesystem, wherein the power management unit driver is configured toprogram a plurality of configuration registers in the power managementunit with data indicating one or more performance states for eachperformance domain of a plurality of performance domains in the system,and wherein each of the plurality of components is included in one ofthe plurality of performance domains; and wherein a first driver of theplurality of drivers is configured to request activation of a firstcomponent of the plurality of components, and wherein the powermanagement unit driver is configured to determine if one or moreperformance domains are to be changed responsive to the activation andto program one or more of the plurality of configuration registersresponsive to the request from the first driver if the one or moreperformance domains are to be changed.
 2. The computer accessiblestorage medium as recited in claim 1 wherein the first driver isconfigured to request deactivation of the first component, and whereinpower management unit driver is configured to program one or more of theplurality of configuration registers responsive to the request anddetermining that the deactivation causes a change in one or moreperformance domains.
 3. The computer accessible storage medium asrecited in claim 2 wherein the plurality of drivers are furtherconfigured to communicate events other than the activation anddeactivation requests to the power management unit driver.
 4. Thecomputer accessible storage medium as recited in claim 3 wherein thepower management unit driver is configured to determine whether or notthe communicated events result in a change to one or more of theperformance domains, and wherein the power management unit driver isconfigured to program the plurality of configuration registers to effectthe change.
 5. The computer accessible storage medium as recited inclaim 2 wherein the power management unit driver is configured tomaintain a device activity table identifying which of the plurality ofcomponents are active, and wherein the power management unit driver isconfigured to update the device activity table responsive to therequests from the plurality of drivers.
 6. The computer accessiblestorage medium as recited in claim 1 wherein the power management unitfurther comprises a second plurality of configuration registers, and thepower management unit driver is configured to program the secondplurality of configuration registers with pointers to the plurality ofconfiguration registers to select the at least two performance statesfrom performance states programmed into the plurality of configurationregisters.
 7. The computer accessible storage medium as recited in claim6 wherein changing the performance domains is effected by changing thesecond plurality of configuration registers to point to different onesof the plurality of configuration registers.
 8. The computer accessiblestorage medium as recited in claim 7 wherein each of the secondplurality of configuration registers is assigned to a respective one ofthe plurality of performance domains and to one of the at least twoperformance states.
 9. A system comprising: a processor; a plurality ofcomponents in a plurality of performance domains; a power managementunit coupled to the processor, the power management unit comprising aplurality of configuration registers programmable with data indicatingone or more performance states for each performance domain of theplurality of performance domains; and a computer accessible storagemedium coupled to the processor, the computer accessible storage mediumstoring: a plurality of drivers, each of the plurality of driverscorresponding to a respective component of the plurality of components,wherein the plurality of drivers each comprise instructions which, whenexecuted by the processor, control the respective component; and a powermanagement unit driver comprising instructions which, when executed bythe processor, control the power management unit, wherein the powermanagement unit driver is configured to program a plurality ofconfiguration registers in the power management unit with dataindicating one or more performance states for each performance domain ofthe plurality of performance domains; and wherein the plurality ofdrivers are configured to interface to the power management unit driverto activate and deactivate the respective components, and wherein thepower management unit driver is configured to control the performancestates responsive to the activation and deactivation of components. 10.The system as recited in claim 9 wherein a first driver of the pluralityof drivers corresponds to a first component of the plurality ofcomponents, and wherein the first driver is configured to requestactivation and deactivation of the first component from the powermanagement unit driver, and wherein power management unit driver isconfigured to selectively modify the performance states responsive tothe request.
 11. The system as recited in claim 9 wherein the pluralityof drivers are further configured to communicate events other than theactivation and deactivation requests to the power management unitdriver.
 12. The system as recited in claim 11 wherein the powermanagement unit driver is configured to determine whether or not thecommunicated events result in a change to one or more performance statesin one or more of the performance domains, and wherein the powermanagement unit driver is configured to control the performance statesresponsive to determining that the communicated events result in thechange.
 13. The system as recited in claim 9 wherein the powermanagement unit driver is configured to maintain a device activity tableidentifying which of the plurality of components are active, and whereinthe power management unit driver is configured to update the deviceactivity table responsive to the requests from the plurality of drivers.14. The system as recited in claim 9 wherein the power management unitfurther comprises a second plurality of configuration registers, and thepower management unit driver is configured to program the secondplurality of configuration registers with pointers to the plurality ofconfiguration registers to select the at least two performance statesfrom performance states programmed into the plurality of configurationregisters.
 15. The system as recited in claim 14 wherein each of thesecond plurality of configuration registers is assigned to a respectiveone of the plurality of performance domains and to one of the at leasttwo performance states.
 16. A method, in a system including a processor;a plurality of components in a plurality of performance domains; and apower management unit coupled to the processor, the power managementunit comprising a plurality of configuration registers programmable withdata indicating one or more performance states for each performancedomain of the plurality of performance domains; the method comprising:executing a first driver of a plurality of drivers on the processor,wherein each of the plurality of drivers corresponds to a respectivecomponent of the plurality of components, wherein the plurality ofdrivers each comprise instructions which, when executed by theprocessor, control the respective component; and executing a powermanagement unit driver on the processor, wherein the power managementunit driver is configured to control the power management unit, andwherein the power management unit driver is configured to program aplurality of configuration registers in the power management unit withdata indicating one or more performance states for each performancedomain of the plurality of performance domains; and responsive to arequest to activate or deactivate a first component from a first driverof the plurality of drivers, the performance management unit drivercontrolling the performance states.
 17. The method as recited in claim16 further comprising: the plurality of drivers, during execution,communicating events other than the activation and deactivation requeststo the power management unit driver; the power management unit driver,during execution, determining that the communicated events result in achange to one or more performance states in one or more of theperformance domains; and the power management unit driver, duringexecution, controlling the performance states responsive to thedetermining.
 18. The method as recited in claim 16 further comprising:the power management unit driver, during execution, maintaining a deviceactivity table identifying which of the plurality of components areactive; and the power management unit driver, during execution, updatingthe device activity table responsive to the requests from the pluralityof drivers.
 19. The method as recited in claim 16 wherein the powermanagement unit further comprises a second plurality of configurationregisters, and the method further comprising the power management unitdriver programming the second plurality of configuration registers withpointers to the plurality of configuration registers to select the atleast two performance states from performance states programmed into theplurality of configuration registers.
 20. The method as recited in claim19 wherein each of the second plurality of configuration registers isassigned to a respective one of the plurality of performance domains andto one of the at least two performance states.